<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    function fn(name, sex) {
      var obj = new Object();
      obj.name = name;
      obj.sex = sex;
      obj.show = function () {
        console.log(obj.name);
      };
      return obj;
    }

    var s1 = fn("张三", "男");
    var s2 = fn("李四", "女");
    s1.show();
    s2.show();

    console.log("s1是不是fn的实例化对象" + s1 instanceof fn); 
    //false 说明s1不是fn的实例 s1是Object的实例化对象
  </script>
</html>
